<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
    body{
        text-align:center;
        font-size:25px;
    }
    span{
        width:30px;
        height:10px;
        display:inline-block;
    }
    </style>
</head>
<body>
    <?php
    for($i=1;$i<=9;$i++){
        $n=$i>5?(10-$i):$i;
        $k=2*$n-1;
        for($j=1;$j<=$k;$j++){
            echo '<span>*</span>';
        }
        echo '<br>';
    }
    ?>
</body>
</html>